package com.library.BookCata.service.impl;

import com.library.BookCata.mapper.BookCataMapper;
import com.library.BookCata.model.BookCata;
import com.library.BookCata.model.BookCataExample;
import com.library.BookCata.service.BookCataService;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookCataServiceImpl implements BookCataService {
    
    private BookCataMapper bookCataMapper;

    //通过构造函数注入mapper
    @Autowired
    public BookCataServiceImpl(BookCataMapper bookCataMapper) {
        this.bookCataMapper = bookCataMapper;
    }

    public long countByExample(BookCataExample example) {
        return bookCataMapper.countByExample(example);
    }

    public int deleteByExample(BookCataExample example) {
        return bookCataMapper.deleteByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return bookCataMapper.deleteByPrimaryKey(id);
    }

    public int insert(BookCata record) {
        return bookCataMapper.insert(record);
    }

    public int insertSelective(BookCata record) {
        return bookCataMapper.insertSelective(record);
    }

    public List<BookCata> selectByExample(BookCataExample example) {
        return bookCataMapper.selectByExample(example);
    }

    public BookCata selectByPrimaryKey(Integer id) {
        return bookCataMapper.selectByPrimaryKey(id);
    }

    public int updateByExampleSelective(@Param("record") BookCata record, @Param("example") BookCataExample example) {
        return bookCataMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(@Param("record") BookCata record, @Param("example") BookCataExample example) {
        return bookCataMapper.updateByExample(record, example);
    }

    public int updateByPrimaryKeySelective(BookCata record) {
        return bookCataMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(BookCata record) {
        return bookCataMapper.updateByPrimaryKey(record);
    }
}